<script setup lang="ts">
import { PropType,ref } from 'vue'
import type { ViewData } from '@/api/types/userType'
import { Descriptions } from '@/components/Descriptions'
import { ElButton } from "element-plus";
import { Dialog } from '@/components/Dialog'
defineProps({
  currentRow: {
    type: Object as PropType<Nullable<ViewData>>,
    default: () => null
  },
  detailSchema: {
    type: Array as PropType<DescriptionsSchema[]>,
    default: () => []
  }
  
})
const dialogVisible=ref(false)

</script>

<template>
  <Descriptions :schema="detailSchema" :data="currentRow || {}"/>
  <ElButton @click="dialogVisible = true">查看报告</ElButton>
  <Dialog v-model="dialogVisible" title="评测报告" fullscreen >
    <iframe :src="'/device/report.html?id=' + currentRow?.pid" style="width: 100%;height: 100%;">

    </iframe>
  </Dialog>
</template>
